package com.booter;

import org.apache.poi.xwpf.usermodel.IBodyElement;
import org.apache.poi.xwpf.usermodel.XWPFDocument;

import java.io.File;
import java.io.FileInputStream;
import java.util.Iterator;

/**
 * HWPFDocument doc
 * XWPFDocument docx
 *
 * @author xueqiu
 * @date 2023/11/3 11:20
 */
public class DocxParse {

    public static void main(String[] args) throws Exception {
        File f = new File("");
        XWPFDocument doc = new XWPFDocument(new FileInputStream(f));//读取docx
        Iterator<IBodyElement> elements = doc.getBodyElementsIterator();
        System.out.println(1);
        System.out.println(2);
        System.out.println(3);
    }

}
